﻿using System.Windows.Data;
using IssueVision.EntityModel;

namespace IssueVision.Common
{
    public class IssueStatusConverter : IValueConverter
    {
        public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            switch ((byte)value)
            {
                case IssueVisionServiceConstant.OpenStatusID:
                    return "Open";
                case IssueVisionServiceConstant.ActiveStatusID:
                    return "Active";
                case IssueVisionServiceConstant.PendingStatusID:
                    return "Pending";
                case IssueVisionServiceConstant.ResolvedStatusID:
                    return "Resolved";
                default:
                    return string.Empty;
            }
        }

        public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new System.NotImplementedException();
        }
    }
}
